03302f45e38c87fa82bbd51bf214998865c37e2b,src/main/java/fr/ign/cogit/simplu3d/experiments/plu2plus/checker/CheckerDistanceParcelBoundaries.java,CheckerDistanceParcelBoundaries,check,#BasicPropertyUnit#RuleContext#,36

Before Change



		List<UnrespectedRule> lUNR = new ArrayList<UnrespectedRule>();

		List<Building> lBuildings = bPU.getBuildings();

		if (lBuildings.isEmpty()) {
			return lUNR;
		}

		for (Building b : lBuildings) {
			
			double dMeasured = b.getFootprint().distance(ims);

			boolean bool = (dMeasured< dmin);

			if (!bool & context.isStopOnFailure()) {
				lUNR.add(null);
				return lUNR;

			}

			if (!bool) {
				lUNR.add(new UnrespectedRule("Distance minimale non respectée : " + dmin + " > " + dMeasured , b.getGeom(), "Distance"));
			}

		}

		return lUNR;
	}

After Change



	}
	@Override
	public List<UnrespectedRule> check(BasicPropertyUnit bPU, RuleContext context) {



		List<AbstractBuilding> lBuildings = new ArrayList<>();
		
		if (context instanceof SimulationcheckerContext) {
			
			if(((SimulationcheckerContext) context).getNewCuboid() == null){
				return new ArrayList<>();
			}


			lBuildings.add(((SimulationcheckerContext) context).getNewCuboid());
			
			
		} else {
			lBuildings.addAll(bPU.getBuildings());
		}